import logging

def logger():
    log = logging.basicConfig(level=logging.DEBUG,
                              filename='log.txt',
                              filemode='a+',
                              format='%(message)s %(asctime)s  %(thread)d ')
    return log